package log

import (
	"fmt"

	"github.com/cz-it/aps/src/config"

	"github.com/cz-it/golangutils/log"
)

var logger *log.Logger

type Log func(format string,v... interface{}) error

var Debug Log
var Error Log
var Fatal Log
var Info  Log
var Trace Log

func Init() error{
	logger,err := log.NewLogger(config.LogPath,config.LogBaseName,config.LogName,config.LogLvl) 
	if err != nil {
		fmt.Println("Init log error")
		return err
	}

	Debug  = logger.Debug
	Error  = logger.Error
	Fatal  = logger.Fatal
	Info   = logger.Info
	Trace  = logger.Trace

	return nil
}






















